# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
# Contributor: Gerardo Exequiel Pozzi <djgera@archlinux.org>

pkgname=archiso
pkgver=70
_commit=2468a13b7d960c015493630b3b13a90f3810a40f  # refs/tags/v70
pkgrel=1
pkgdesc="Tools for creating Arch Linux live and install iso images"
arch=(any)
url="https://gitlab.archlinux.org/archlinux/archiso"
license=(GPL3)
depends=(
  arch-install-scripts
  bash
  dosfstools
  e2fsprogs
  erofs-utils
  grub
  libarchive
  libisoburn
  mtools
  squashfs-tools
)
makedepends=(git)
checkdepends=(shellcheck)
optdepends=(
  'edk2-ovmf: for emulating UEFI with run_archiso'
  'gnupg: for PGP signature verification of rootfs over PXE'
  'openssl: for CMS signature verification of PXE artifacts and rootfs over PXE'
  'qemu-desktop: for run_archiso'
)
source=(git+https://gitlab.archlinux.org/archlinux/archiso.git#tag=$_commit?signed)
sha256sums=('SKIP')
validpgpkeys=(
  '991F6E3F0765CF6295888586139B09DA5BF0D338' # David Runge <dvzrv@archlinux.org>
  'BB8E6F1B81CF0BB301D74D1CBF425A01E68B38EF' # nl6720 <nl6720@archlinux.org>
)

check() {
  make -k check -C $pkgbase
}

package() {
  make DESTDIR="$pkgdir" PREFIX=/usr install -C $pkgbase
}
